package com.calvin.study.observer.event;

import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class ListenerThree {
	
	@EventListener
	public void myEventListenter(MyEvent event) {
		log.info("监听到 MyEvent ... ");
		MyEvent myEvent = event;
		System.out.println(event.getTime()+event.getMsg());
	}
	@EventListener
	public void ContextRefreshedEventListener(ContextRefreshedEvent event) {
		 log.info("监听到 ContextRefreshedEvent...");
	}

}
